
<nav class="navbar navbar-default">
  <div class="container">
    <div class="navbar-header">
      <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1" aria-expanded="false">
        <span class="sr-only">Toggle navigation</span>
        <span class="icon-bar"></span>
        <span class="icon-bar"></span>
        <span class="icon-bar"></span>
      </button>
      <a class="navbar-brand" href="/admin">阳毅商城管理平台</a>
    </div>

    <div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
      <ul class="nav navbar-nav">
        <li class="<%= 'active' if request.path =~ /admin\/channels/ %>"><a href="<%= admin_channels_path %>">渠道</a></li>
        <li class="<%= 'active' if request.path =~ /admin\/survey_fees/ %>"><a href="<%= admin_survey_fees_path %>">测量费用</a></li>
        <li class="<%= 'active' if request.path =~ /admin\/(product|categories|brands|specs)/ %>">
          <a href="#" data-jq-dropdown="#jq-dropdown-2">商品相关 <span class="caret"></span></a>
        </li>
        <li class="<%= 'active' if request.path =~ /admin\/roles/ %>"><a href="<%= admin_roles_path %>">用户角色</a></li>
        <li class="<%= 'active' if request.path =~ /admin\/users/ %>"><a href="<%= admin_users_path %>">用户</a></li>
        <li class="<%= 'active' if request.path =~ /admin\/orders/ %>"><a href="<%= admin_orders_path %>">订单</a></li>
        <li class="<%= 'active' if request.path =~ /admin\/(\w)*promotions/ %>">
          <a href="#" data-jq-dropdown="#jq-dropdown-4">活动 <span class="caret"></span></a>
        </li>
        <li class="<%= 'active' if request.path =~ /admin\/wiki/ %>">
          <a href="#" data-jq-dropdown="#jq-dropdown-1">百科 <span class="caret"></span></a>
        </li>
        <li class="<%= 'active' if request.path =~ /admin\/desgin/ %>">
          <a href="#" data-jq-dropdown="#jq-dropdown-3">设计师 <span class="caret"></span></a>
        </li>
        <li class="<%= 'active' if request.path =~ /admin\/service_(network|region)/ %>">
          <a href="<%= admin_service_networks_path %>">服务网点</a>
        </li>
        <li class="<%= 'active' if request.path =~ /admin\/(sale_records|join_records)/ %>">
          <a href="#" data-jq-dropdown="#jq-dropdown-5">售后/申请<span class="caret"></span></a>
        </li>
      </ul>
      <ul class="nav navbar-nav navbar-right">
        <% if logined? %>
          <li><a href="javascipt::"><%= current_user.name %></a></li>
          <li><%= link_to "退出", logout_path %></li>
        <% end %>
      </ul>
    </div>
  </div>
</nav>
